# version:2
FROM harbor.opsbase.cn/public/cmdb

WORKDIR /home/app
COPY . /home/app
RUN  rm -rf /home/app/env /home/app/db.sqlite3

EXPOSE 8000
# RUN  python manage.py makemigrations  &&  python manage.py migrate
CMD [ "python", "./manage.py", "runserver", "0.0.0.0:8000"]

# docker build -t lghost/cmdb:latest . -f Dockerfile # 构建
# docker build -t lghost/cmdb:v1 . -f Dockerfile-CI # 基于基础包构建
# docker push lghost/cmdb:latest # 提交到dockerhub

## 私有库tag
# docker tag lghost/cmdb:latest harbor.opsbase.cn/public/cmdb:latest

## 简洁启动
# docker run  -d -p8000:8000  --name cmdb  lghost/cmdb:latest

## 初始化数据
# docker exec -it cmdb python init.py

